// @APIVersion 1.0.0
// @Title beego Test API
// @Description beego has a very cool tools to autogenerate documents for your API
// @Contact astaxie@gmail.com
// @TermsOfServiceUrl http://beego.me/
// @License Apache 2.0
// @LicenseUrl http://www.apache.org/licenses/LICENSE-2.0.html
package routers

import (
	"github.com/astaxie/beego"
	// "onstream"
	"qysoft/controllers"
)

func init() {
	beego.Router("/", &controllers.AuthController{}, "*:Health")
	beego.Router("/Login", &controllers.AuthController{}, "*:Login")
	beego.Router("/Loginyz", &controllers.AuthController{}, "*:Loginyz")
	beego.Router("/Getcpt", &controllers.AuthController{}, "*:Getcpt")
	beego.Router("/Logout", &controllers.AuthController{}, "*:Logout")

	beego.Router("/upload/VideoUpload", &controllers.UploadController{}, "post:VideoUpload")
	beego.Router("/upload/PhotoUpload", &controllers.UploadController{}, "post:PhotoUpload")

	//	srs视频服务
	beego.Router("/srs/Ondvr", &controllers.SrsController{}, "*:Ondvr")
	beego.Router("/srs/Onconnect", &controllers.SrsController{}, "*:Onconnect")
	beego.Router("/srs/Onpublish", &controllers.SrsController{}, "*:Onpublish")
	beego.Router("/srs/Onclose", &controllers.SrsController{}, "*:Onclose")
	beego.Router("/srs/Onunpublish", &controllers.SrsController{}, "*:Onunpublish")
	beego.Router("/srs/Onstop", &controllers.SrsController{}, "*:Onstop")

	// Long polling.
	//	beego.Router("/ilive/lp", &controllers.LongPollingController{}, "get:Join")
	//	beego.Router("/ilive/lp/post", &controllers.LongPollingController{})
	//	beego.Router("/ilive/lp/fetch", &controllers.LongPollingController{}, "get:Fetch")
	// 任务管理
	beego.Router("/task/", &controllers.MainController{}, "*:Index")
	beego.Router("/task/login", &controllers.MainController{}, "*:Login")
	beego.Router("/task/logout", &controllers.MainController{}, "*:Logout")
	beego.Router("/task/profile", &controllers.MainController{}, "*:Profile")
	beego.Router("/task/gettime", &controllers.MainController{}, "*:GetTime")
	beego.Router("/task/help", &controllers.HelpController{}, "*:Index")
	beego.AutoRouter(&controllers.TaskController{})
	beego.AutoRouter(&controllers.GroupController{})
	beego.AutoRouter(&controllers.ServerController{})
	// WebSocket.
	beego.Router("/ws", &controllers.WebSocketController{}, "*:Get")
	beego.Router("/ws/join", &controllers.WebSocketController{}, "*:Join")

	ns := beego.NewNamespace("/ilive",
		beego.NSNamespace("/assets",
			beego.NSInclude(
				&controllers.AssetsController{},
			),
		),

		beego.NSNamespace("/assetsscrap",
			beego.NSInclude(
				&controllers.AssetsscrapController{},
			),
		),

		beego.NSNamespace("/action",
			beego.NSInclude(
				&controllers.ActionController{},
			),
		),

		//		beego.NSNamespace("/assets_depts",
		//			beego.NSInclude(
		//				&controllers.AssetsDeptsController{},
		//			),
		//		),

		beego.NSNamespace("/assetsbuy",
			beego.NSInclude(
				&controllers.AssetsbuyController{},
			),
		),

		beego.NSNamespace("/assetschange",
			beego.NSInclude(
				&controllers.AssetschangeController{},
			),
		),

		beego.NSNamespace("/assettypes",
			beego.NSInclude(
				&controllers.AssettypesController{},
			),
		),

		beego.NSNamespace("/bulletin",
			beego.NSInclude(
				&controllers.BulletinController{},
			),
		),

		beego.NSNamespace("/dept",
			beego.NSInclude(
				&controllers.DeptController{},
			),
		),

		beego.NSNamespace("/event",
			beego.NSInclude(
				&controllers.EventController{},
			),
		),

		beego.NSNamespace("/flow",
			beego.NSInclude(
				&controllers.FlowController{},
			),
		),

		beego.NSNamespace("/flowinstance",
			beego.NSInclude(
				&controllers.FlowinstanceController{},
			),
		),
		beego.NSNamespace("/livechannel",
			beego.NSInclude(
				&controllers.LivechannelController{},
			),
		),
		beego.NSNamespace("/log",
			beego.NSInclude(
				&controllers.LogController{},
			),
		),

		beego.NSNamespace("/message",
			beego.NSInclude(
				&controllers.MessageController{},
			),
		),

		beego.NSNamespace("/organization",
			beego.NSInclude(
				&controllers.OrganizationController{},
			),
		),

		beego.NSNamespace("/resource",
			beego.NSInclude(
				&controllers.ResourceController{},
			),
		),

		beego.NSNamespace("/role",
			beego.NSInclude(
				&controllers.RoleController{},
			),
		),

		beego.NSNamespace("/state",
			beego.NSInclude(
				&controllers.StateController{},
			),
		),

		beego.NSNamespace("/stateinstance",
			beego.NSInclude(
				&controllers.StateinstanceController{},
			),
		),

		beego.NSNamespace("/transition",
			beego.NSInclude(
				&controllers.TransitionController{},
			),
		),

		beego.NSNamespace("/user",
			beego.NSInclude(
				&controllers.UserController{},
			),
		),

		beego.NSNamespace("/video",
			beego.NSInclude(
				&controllers.VideoController{},
			),
		),

		beego.NSNamespace("/watchhistory",
			beego.NSInclude(
				&controllers.WatchHistoryController{},
			),
		),
		beego.NSNamespace("/statistics",
			beego.NSInclude(
				&controllers.StatisticsController{},
			),
		),
		beego.NSNamespace("/buys",
			beego.NSInclude(
				&controllers.BuysController{},
			),
		),

		beego.NSNamespace("/buy",
			beego.NSInclude(
				&controllers.BuyController{},
			),
		),

		beego.NSNamespace("/cust",
			beego.NSInclude(
				&controllers.CustController{},
			),
		),

		beego.NSNamespace("/ins",
			beego.NSInclude(
				&controllers.InsController{},
			),
		),

		beego.NSNamespace("/order",
			beego.NSInclude(
				&controllers.OrderController{},
			),
		),

		beego.NSNamespace("/outs",
			beego.NSInclude(
				&controllers.OutsController{},
			),
		),

		beego.NSNamespace("/partner",
			beego.NSInclude(
				&controllers.PartnerController{},
			),
		),

		beego.NSNamespace("/pay",
			beego.NSInclude(
				&controllers.PayController{},
			),
		),

		beego.NSNamespace("/preorder",
			beego.NSInclude(
				&controllers.PreorderController{},
			),
		),

		beego.NSNamespace("/presales",
			beego.NSInclude(
				&controllers.PresalesController{},
			),
		),

		beego.NSNamespace("/prod",
			beego.NSInclude(
				&controllers.ProdController{},
			),
		),
		beego.NSNamespace("/prodtype",
			beego.NSInclude(
				&controllers.ProdTypeController{},
			),
		),

		beego.NSNamespace("/receiv",
			beego.NSInclude(
				&controllers.ReceivController{},
			),
		),

		beego.NSNamespace("/sales",
			beego.NSInclude(
				&controllers.SalesController{},
			),
		),

		beego.NSNamespace("/service",
			beego.NSInclude(
				&controllers.ServiceController{},
			),
		),

		beego.NSNamespace("/sin",
			beego.NSInclude(
				&controllers.SinController{},
			),
		),

		beego.NSNamespace("/sout",
			beego.NSInclude(
				&controllers.SoutController{},
			),
		),

		beego.NSNamespace("/stock",
			beego.NSInclude(
				&controllers.StockController{},
			),
		),
		beego.NSNamespace("/temp",
			beego.NSInclude(
				&controllers.TempController{},
			),
		),
		beego.NSNamespace("/tempitem",
			beego.NSInclude(
				&controllers.TempitemController{},
			),
		),
		beego.NSNamespace("/buyitem",
			beego.NSInclude(
				&controllers.BuyItemController{},
			),
		),
		beego.NSNamespace("/serv",
			beego.NSInclude(
				&controllers.ServController{},
			),
		),
	)
	beego.AddNamespace(ns)
}
